package com.cet.designpatterns.mediator;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-09-23 10:54
 **/
public class Client {
    public static void main(String[] args) {
        Mediator mediator = new ConcreteMediator();
        Alarm alarm = new Alarm(mediator, "米老鼠闹钟");
        CoffeeMachine coffeeMachine = new CoffeeMachine(mediator, "看起来有点旧的咖啡机");
        TV tv = new TV(mediator, "长虹电视机");
        Curtain curtain = new Curtain(mediator, "蓝色的窗帘");
        alarm.sendAlarm(0);
        coffeeMachine.FinishCoffee();
        alarm.sendAlarm(1);
    }
}
